{extend name="base/index"/}

{block name="page_location"}
<div class="row">
	<div class="col-12">
		<div class="page-title-box">
			<div class="page-title-right">
				<ol class="breadcrumb m-0">
					<li class="breadcrumb-item"><a href="{:url('index/index')}">管理中心</a></li>
					<li class="breadcrumb-item active"><i class="iconfont icon-angle-right"></i>申请提现管理</li>
				</ol>
			</div>
			<h4 class="page-title">申请提现</h4>
		</div>
	</div>
</div>
{/block}
{block name="body"}
<link rel="stylesheet" href="__PLUGIN__/jQuery.cxCalendar/css/jquery.cxcalendar.css" />	
<div class="row" id="pay_drawcash_page">
	<div class="col-12">
		<div class="card">
			<div class="card-body">
				<form action="{:url('pay/drawcash')}" method="get"  id="payrecord_search_frm">
					<div class="form-row align-items-center">
						<div class="col-auto">
							<label class="sr-only" for="inlineFormInputGroup"></label>
							<div class="input-group mb-2">
								<div class="input-group-prepend">
									<div class="input-group-text">选择</div>
								</div>
								<select class="form-control" tabindex="1" name="status">
									<option value="">所有</option>
									<option value="0" {eq name="status" value="0"}selected="selected"{/eq}>申请中</option>
									<option value="1" {eq name="status" value="1"}selected="selected"{/eq}>已处理</option>
									<option value="2" {eq name="status" value="2"}selected="selected"{/eq}>已拒绝</option>
								</select>
							</div>								
						</div>	
						<div class="col-auto">
							<label class="sr-only" for="inlineFormInputGroup"></label>
							<div class="input-group mb-2">
								<div class="input-group-prepend">
									<div class="input-group-text">开始</div>
								</div>
								<input type="text" class="form-control" name="stime" placeholder="选择开始时间" value="{$stime}">
							</div>
						</div>
						<div class="col-auto">
							<label class="sr-only" for="inlineFormInputGroup"></label>
							<div class="input-group mb-2">
								<div class="input-group-prepend">
									<div class="input-group-text">结束</div>
								</div>
								<input type="text" class="form-control" name="etime" placeholder="选择开始时间" value="{$etime}">
							</div>
						</div>
						<div class="col-auto">
							<label class="sr-only" for="inlineFormInputGroup"></label>
							<div class="input-group mb-2">
								<div class="input-group-prepend">
									<div class="input-group-text">搜索</div>
								</div>
								<input type="text" class="form-control kw enter_goto" name="kw" placeholder="搜索会员名、订单号" value="{$kw}">
							</div>
						</div>
						<div class="col-auto">
							<button type="submit" class="btn btn-primary mb-2">搜索</button>
						</div>
						<div class="col-auto">
							<label class="sr-only" for="inlineFormInputGroup"></label>
							<div class="input-group mb-2">
								<div class="input-group-addon">
									<a href="javascript:;" class="btn btn-primary check_select_btn" id="export_xls_btn">结果导出</a>
									</div>
								</div>
							</div>
						</div>
					</div>
				</form>			
				<table class="table table-hover">
                    <thead>
                        <tr>
                            <th width="5%">ID</th>
                            <th width="5%">申请者</th>
                            <th width="5%">提现银行</th>
                            <th width="5%">持卡人</th>
                            <th width="10%">开户行</th>
                            <th width="10%">提现账号</th>
                            <th width="10%">提现金额</th>
                            <th width="10%">提现时间</th>
                            <th width="10%">打款时间</th>
                            <th width="5%">提现状态</th>
                            <th width="10%">操作</th>
                        </tr>
                    </thead>
                    <tbody>
						{volist name="list" id="data"}
                        <tr>
                            <td>{$data.id}</td>
                            <td>{$data.username}</td>
                            <td>{$data.bankname}</td>
                            <td>{$data.cardholder}</td>
                            <td>{$data.opening_bank}</td>
                            <td>{$data.cardno}</td>
                            <td>{$data.amount} 元</td>
                            <td title="{$data.posttime|date="Y-m-d H:i:s",###}"><span class="badge badge-primary">{$data.posttime|date="Y-m-d H:i",###}</span></td>
							{gt name="data.retime" value="1487800000"}
                            <td title="{$data.retime|date="Y-m-d H:i:s",###}"><span class="badge badge-primary">{$data.posttime|date="Y-m-d H:i",###}</span></td>
							{else/}
							<td>暂无</td>
							{/gt}
                            <td>
                            	{switch name="data.status"}
                            		{case value="0"}<span class="badge badge-primary">申请中</span>{/case}
                            		{case value="1"}<span class="badge badge-secondary">已处理</span>{/case}
                            		{case value="2"}<span class="badge badge-danger">已拒绝</span>{/case}
                            	{/switch}
                            </td>
                            <td>
                            	{switch name="data.status"}
                            		{case value="0"}
										<a href="javascript:;" class="btn btn-primary btn-sm allow_btn" attr-id="{$data.id}">申请通过</a>
										<a href="javascript:;" class="btn btn-primary btn-sm cancel_btn" attr-id="{$data.id}">取消申请</a>
									{/case}
                            	{/switch}
                            </td>
                        </tr>
						{/volist}
                    </tbody>
                </table>
				<div class="row">
                	<div class="col-12" style="text-align: center;">
                		{$pagelist}
                	</div>
                </div>
			</div>
		</div>
	</div>
</div>
{/block}
{block name="script"}
<script type="text/javascript" src="__PLUGIN__/jQuery.cxCalendar/js/jquery.cxcalendar.min.js"></script>
<script type="text/javascript" src="__PLUGIN__/jQuery.cxCalendar/js/jquery.cxcalendar.languages.js"></script>
<script type="text/javascript">
$(function(){
	$("input[name=stime]").cxCalendar({type: 'datetime',format: 'YYYY-MM-DD HH:mm:ss'});
	$("input[name=etime]").cxCalendar({type: 'datetime',format: 'YYYY-MM-DD HH:mm:ss'});
});
</script>
{/block}